

package com.hazelcast.replicatedmap.impl.record;

import com.hazelcast.internal.serialization.Data;
import com.hazelcast.spi.impl.eventservice.EventFilter;

/**
 * Basic filter implementation for selecting interesting events on the server
 */
public class ReplicatedEntryEventFilter implements EventFilter {

    protected Data key;

    public ReplicatedEntryEventFilter(Data key) {
        this.key = key;
    }

    @Override
    public boolean eval(Object arg) {
        return key == null || key.equals(arg);
    }
}
